//
//  FilterBrandViewCell.swift
//  koolcar
//
//  Created by xiantian on 2023/11/28.
//

import UIKit

class FilterBrandViewCell: UITableViewCell {
    var titleLab: UILabel!
    var lineView: UIView!
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        titleLab = UILabel()
        titleLab.textColor = Theme.titleLabColor
        titleLab.backgroundColor = UIColor.clear
        titleLab.font = UIFont.init(name: Theme.PingFangSCRegular, size: 14)
        titleLab.numberOfLines = 1
        titleLab.lineBreakMode = .byTruncatingTail
        titleLab.textAlignment = .left
        contentView.addSubview(titleLab)
        
        lineView = UIView()
        lineView.backgroundColor = Theme.lineColor
        contentView.addSubview(lineView)
        
        self.addSnpLayout()
    }
    
    private func addSnpLayout(){
        titleLab.snp.makeConstraints { make in
            make.left.equalTo(30)
            make.top.bottom.equalTo(0)
            make.right.equalTo(-40)
        }
        lineView.snp.makeConstraints { make in
            make.left.equalTo(0)
            make.right.equalTo(0)
            make.height.equalTo(0.5)
            make.bottom.equalTo(-0.5)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
